const tap_drag = function (e) {
  this.newmark = e.touches[0].pageX;
  if (this.mark <= this.newmark) {
    this.istoright = false;
  }
  if ((this.mark - 17) > this.newmark) {
    this.istoright = true;
  }
  this.mark = this.newmark;
  if (this.istoright) {
    this.setData({
      open: e.currentTarget.id
    })
  }
}

const tap_end = function (e) {
  var rs = this;
  this.mark = 0;
  this.newmark = 0;
  if (this.istoright) {
    // this.setData({
    //   open: e.currentTarget.id,
    // })
  } else {
    this.setData({
      open: -1,
    });
  }
}

module.exports = {
  Tap_Dray: tap_drag,
  Tap_End : tap_end
}
